const commonLayout = () => import('@/layout/commonLayout')
/**
 * @description 所有的业务路由
 * @param { String } meta.title - 路由的标题
 * @param { String } meta.active - 当前路由属于哪个路由的name值（用于菜单的选中状态）
 * @param { String } meta.icon - 路由的图标
 * @param { String } meta.keepAlive - 路由是否缓存
 * @param { Boolean } meta.isForm - 路由是否是表单路由，如果是表单路由在导航栏那一旦跳转不做历史不做保留
 */
export default [
	{
		path: '/',
		component: () => import('@/views/home'),
		meta: { title: '首页' },
		name: 'home'
	},
	{
		path: '/modelCenter',
		component: () => import('@/views/modelCenter'),
		meta: { title: '模型中心' },
		name: 'modelCenter'
	},
	{
		path: '/addModel',
		component: () => import('@/views/modelCenter/addModel'),
		meta: { title: '新增模型' },
		name: 'addModel'
	},
	{
		path: '/addProject',
		component: () => import('@/views/modelCenter/addProject'),
		meta: { title: '新增项目' },
		name: 'addProject'
	},

	{
		path: '/animationCenter',
		component: () => import('@/views/animationCenter'),
		meta: { title: '动画中心' },
		name: 'animationCenter'
	},
	{
		path: '/addAnimation',
		component: () => import('@/views/animationCenter/addAnimation'),
		meta: { title: '新增动画' },
		name: 'addAnimation'
	},
	{
		path: '/standardLib',
		component: () => import('@/views/standardLib'),
		meta: { title: '标准库' },
		name: 'standardLib'
	},
	{
		path: '/planCenter',
		component: () => import('@/views/planCenter'),
		meta: { title: '方案中心' },
		name: 'planCenter'
	},
	{
		path: '/systemManage',
		component: commonLayout,
		meta: { title: '系统设置' },
		redirect: '/systemManage/user',
		name: 'systemManage',
		children: [
			{
				path: 'dict',
				component: () => import('@/views/systemManage/dict'),
				name: 'dict',
				meta: {
					title: '字典管理',
					active: 'projectHome',
					icon: '首页'
				}
			},
			{
				path: 'dept',
				component: () => import('@/views/systemManage/dept'),
				name: 'dept',
				meta: {
					title: '组织管理',
					active: 'projectHome',
					icon: '首页'
				}
			},
			{
				path: 'menu',
				component: () => import('@/views/systemManage/menu'),
				name: 'menu',
				meta: {
					title: '菜单管理',
					active: 'projectHome',
					icon: '首页'
				}
			},
			{
				path: 'role',
				component: () => import('@/views/systemManage/role'),
				name: 'role',
				meta: {
					title: '角色管理',
					active: 'projectHome',
					icon: '首页'
				}
			},
			{
				path: 'user',
				component: () => import('@/views/systemManage/user'),
				name: 'user',
				meta: {
					title: '用户管理',
					active: 'projectHome',
					icon: '首页'
				}
			}
		]
	}
]
